package org.example.lanchain.service;

import org.example.lanchain.bean.AiAssistant;
import org.example.lanchain.mapper.AiAssistantMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AiAssistantService {

    @Autowired
    private AiAssistantMapper aiAssistantMapper;

    public void createAiAssistant(AiAssistant aiAssistant) {
        aiAssistantMapper.insertAiAssistant(aiAssistant);
    }

    public AiAssistant getAiAssistantById(Long id) {
        return aiAssistantMapper.getAiAssistantById(id);
    }

    public List<AiAssistant> getAllAiAssistants(Long userId) {
        return aiAssistantMapper.getAllAiAssistants(userId);
    }

    public void updateAiAssistant(AiAssistant aiAssistant) {
        aiAssistantMapper.updateAiAssistant(aiAssistant);
    }

    public void deleteAiAssistant(Long id) {
        aiAssistantMapper.deleteAiAssistant(id);
    }
} 